3.83 \(\int \frac {(d+e x) (a+b \log (c x^n))^2}{x^5} \, dx\)

Optimal. Leaf size=109 \[ -\frac {b d n \left (a+b \log \left (c x^n\right )\right )}{8 x^4}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{4 x^4}-\frac {2 b e n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {b^2 d n^2}{32 x^4}-\frac {2 b^2 e n^2}{27 x^3} \]

[Out]

-1/32*b^2*d*n^2/x^4-2/27*b^2*e*n^2/x^3-1/8*b*d*n*(a+b*ln(c*x^n))/x^4-2/9*b*e*n*(a+b*ln(c*x^n))/x^3-1/4*d*(a+b*
ln(c*x^n))^2/x^4-1/3*e*(a+b*ln(c*x^n))^2/x^3

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2353, 2305, 2304} \[ -\frac {b d n \left (a+b \log \left (c x^n\right )\right )}{8 x^4}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{4 x^4}-\frac {2 b e n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {b^2 d n^2}{32 x^4}-\frac {2 b^2 e n^2}{27 x^3} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)*(a + b*Log[c*x^n])^2)/x^5,x]

[Out]

-(b^2*d*n^2)/(32*x^4) - (2*b^2*e*n^2)/(27*x^3) - (b*d*n*(a + b*Log[c*x^n]))/(8*x^4) - (2*b*e*n*(a + b*Log[c*x^
n]))/(9*x^3) - (d*(a + b*Log[c*x^n])^2)/(4*x^4) - (e*(a + b*Log[c*x^n])^2)/(3*x^3)

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rubi steps

\begin {align*} \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^5} \, dx &=\int \left (\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{x^5}+\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{x^4}\right ) \, dx\\ &=d \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^5} \, dx+e \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx\\ &=-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{4 x^4}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}+\frac {1}{2} (b d n) \int \frac {a+b \log \left (c x^n\right )}{x^5} \, dx+\frac {1}{3} (2 b e n) \int \frac {a+b \log \left (c x^n\right )}{x^4} \, dx\\ &=-\frac {b^2 d n^2}{32 x^4}-\frac {2 b^2 e n^2}{27 x^3}-\frac {b d n \left (a+b \log \left (c x^n\right )\right )}{8 x^4}-\frac {2 b e n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{4 x^4}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 82, normalized size = 0.75 \[ -\frac {216 d \left (a+b \log \left (c x^n\right )\right )^2+27 b d n \left (4 a+4 b \log \left (c x^n\right )+b n\right )+288 e x \left (a+b \log \left (c x^n\right )\right )^2+64 b e n x \left (3 a+3 b \log \left (c x^n\right )+b n\right )}{864 x^4} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)*(a + b*Log[c*x^n])^2)/x^5,x]

[Out]

-1/864*(216*d*(a + b*Log[c*x^n])^2 + 288*e*x*(a + b*Log[c*x^n])^2 + 64*b*e*n*x*(3*a + b*n + 3*b*Log[c*x^n]) +
27*b*d*n*(4*a + b*n + 4*b*Log[c*x^n]))/x^4

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 188, normalized size = 1.72 \[ -\frac {27 \, b^{2} d n^{2} + 108 \, a b d n + 216 \, a^{2} d + 72 \, {\left (4 \, b^{2} e x + 3 \, b^{2} d\right )} \log \relax (c)^{2} + 72 \, {\left (4 \, b^{2} e n^{2} x + 3 \, b^{2} d n^{2}\right )} \log \relax (x)^{2} + 32 \, {\left (2 \, b^{2} e n^{2} + 6 \, a b e n + 9 \, a^{2} e\right )} x + 12 \, {\left (9 \, b^{2} d n + 36 \, a b d + 16 \, {\left (b^{2} e n + 3 \, a b e\right )} x\right )} \log \relax (c) + 12 \, {\left (9 \, b^{2} d n^{2} + 36 \, a b d n + 16 \, {\left (b^{2} e n^{2} + 3 \, a b e n\right )} x + 12 \, {\left (4 \, b^{2} e n x + 3 \, b^{2} d n\right )} \log \relax (c)\right )} \log \relax (x)}{864 \, x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))^2/x^5,x, algorithm="fricas")

[Out]

-1/864*(27*b^2*d*n^2 + 108*a*b*d*n + 216*a^2*d + 72*(4*b^2*e*x + 3*b^2*d)*log(c)^2 + 72*(4*b^2*e*n^2*x + 3*b^2
*d*n^2)*log(x)^2 + 32*(2*b^2*e*n^2 + 6*a*b*e*n + 9*a^2*e)*x + 12*(9*b^2*d*n + 36*a*b*d + 16*(b^2*e*n + 3*a*b*e
)*x)*log(c) + 12*(9*b^2*d*n^2 + 36*a*b*d*n + 16*(b^2*e*n^2 + 3*a*b*e*n)*x + 12*(4*b^2*e*n*x + 3*b^2*d*n)*log(c
))*log(x))/x^4

________________________________________________________________________________________

giac [B]  time = 0.31, size = 206, normalized size = 1.89 \[ -\frac {288 \, b^{2} n^{2} x e \log \relax (x)^{2} + 192 \, b^{2} n^{2} x e \log \relax (x) + 576 \, b^{2} n x e \log \relax (c) \log \relax (x) + 216 \, b^{2} d n^{2} \log \relax (x)^{2} + 64 \, b^{2} n^{2} x e + 192 \, b^{2} n x e \log \relax (c) + 288 \, b^{2} x e \log \relax (c)^{2} + 108 \, b^{2} d n^{2} \log \relax (x) + 576 \, a b n x e \log \relax (x) + 432 \, b^{2} d n \log \relax (c) \log \relax (x) + 27 \, b^{2} d n^{2} + 192 \, a b n x e + 108 \, b^{2} d n \log \relax (c) + 576 \, a b x e \log \relax (c) + 216 \, b^{2} d \log \relax (c)^{2} + 432 \, a b d n \log \relax (x) + 108 \, a b d n + 288 \, a^{2} x e + 432 \, a b d \log \relax (c) + 216 \, a^{2} d}{864 \, x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))^2/x^5,x, algorithm="giac")

[Out]

-1/864*(288*b^2*n^2*x*e*log(x)^2 + 192*b^2*n^2*x*e*log(x) + 576*b^2*n*x*e*log(c)*log(x) + 216*b^2*d*n^2*log(x)
^2 + 64*b^2*n^2*x*e + 192*b^2*n*x*e*log(c) + 288*b^2*x*e*log(c)^2 + 108*b^2*d*n^2*log(x) + 576*a*b*n*x*e*log(x
) + 432*b^2*d*n*log(c)*log(x) + 27*b^2*d*n^2 + 192*a*b*n*x*e + 108*b^2*d*n*log(c) + 576*a*b*x*e*log(c) + 216*b
^2*d*log(c)^2 + 432*a*b*d*n*log(x) + 108*a*b*d*n + 288*a^2*x*e + 432*a*b*d*log(c) + 216*a^2*d)/x^4

________________________________________________________________________________________

maple [C]  time = 0.26, size = 1486, normalized size = 13.63 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(b*ln(c*x^n)+a)^2/x^5,x)

[Out]

-1/12*b^2*(4*e*x+3*d)/x^4*ln(x^n)^2-1/72*(24*I*Pi*b^2*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2-24*I*Pi*b^2*e*x*csgn(I*x
^n)*csgn(I*c*x^n)*csgn(I*c)-24*I*Pi*b^2*e*x*csgn(I*c*x^n)^3+24*I*Pi*b^2*e*x*csgn(I*c*x^n)^2*csgn(I*c)+48*b^2*e
*x*ln(c)+16*b^2*e*n*x+48*a*b*e*x+18*I*Pi*b^2*d*csgn(I*x^n)*csgn(I*c*x^n)^2-18*I*Pi*b^2*d*csgn(I*x^n)*csgn(I*c*
x^n)*csgn(I*c)-18*I*Pi*b^2*d*csgn(I*c*x^n)^3+18*I*Pi*b^2*d*csgn(I*c*x^n)^2*csgn(I*c)+36*b^2*d*ln(c)+9*b^2*d*n+
36*a*b*d)/x^4*ln(x^n)-1/864*(-54*Pi^2*b^2*d*csgn(I*c*x^n)^6+432*a*b*d*ln(c)+108*b^2*d*n*ln(c)+288*b^2*e*x*ln(c
)^2+216*a^2*d+216*b^2*d*ln(c)^2-72*Pi^2*b^2*e*x*csgn(I*c*x^n)^6+27*b^2*d*n^2+108*a*b*d*n+288*a^2*e*x-96*I*Pi*b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*Pi^2*b^2*d*cs
gn(I*x^n)^2*csgn(I*c*x^n)^4+108*Pi^2*b^2*d*csgn(I*x^n)*csgn(I*c*x^n)^5+108*Pi^2*b^2*d*csgn(I*c)*csgn(I*c*x^n)^
5-54*Pi^2*b^2*d*csgn(I*c)^2*csgn(I*c*x^n)^4-216*I*Pi*a*b*d*csgn(I*c*x^n)^3-54*I*Pi*b^2*d*n*csgn(I*c*x^n)^3-72*
Pi^2*b^2*e*x*csgn(I*c)^2*csgn(I*x^n)^2*csgn(I*c*x^n)^2-288*Pi^2*b^2*e*x*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)^4+
144*Pi^2*b^2*e*x*csgn(I*c)^2*csgn(I*x^n)*csgn(I*c*x^n)^3-288*I*Pi*a*b*e*x*csgn(I*c*x^n)^3-288*I*ln(c)*Pi*b^2*e
*x*csgn(I*c*x^n)^3+54*I*Pi*b^2*d*n*csgn(I*x^n)*csgn(I*c*x^n)^2+192*a*b*e*n*x+144*Pi^2*b^2*e*x*csgn(I*c)*csgn(I
*c*x^n)^5-72*Pi^2*b^2*e*x*csgn(I*c)^2*csgn(I*c*x^n)^4-72*Pi^2*b^2*e*x*csgn(I*x^n)^2*csgn(I*c*x^n)^4+144*Pi^2*b
^2*e*x*csgn(I*x^n)*csgn(I*c*x^n)^5-216*I*ln(c)*Pi*b^2*d*csgn(I*c*x^n)^3+216*I*ln(c)*Pi*b^2*d*csgn(I*x^n)*csgn(
I*c*x^n)^2+216*I*ln(c)*Pi*b^2*d*csgn(I*c*x^n)^2*csgn(I*c))/x^4

________________________________________________________________________________________

maxima [A]  time = 0.74, size = 151, normalized size = 1.39 \[ -\frac {2}{27} \, b^{2} e {\left (\frac {n^{2}}{x^{3}} + \frac {3 \, n \log \left (c x^{n}\right )}{x^{3}}\right )} - \frac {1}{32} \, b^{2} d {\left (\frac {n^{2}}{x^{4}} + \frac {4 \, n \log \left (c x^{n}\right )}{x^{4}}\right )} - \frac {b^{2} e \log \left (c x^{n}\right )^{2}}{3 \, x^{3}} - \frac {2 \, a b e n}{9 \, x^{3}} - \frac {2 \, a b e \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac {b^{2} d \log \left (c x^{n}\right )^{2}}{4 \, x^{4}} - \frac {a b d n}{8 \, x^{4}} - \frac {a^{2} e}{3 \, x^{3}} - \frac {a b d \log \left (c x^{n}\right )}{2 \, x^{4}} - \frac {a^{2} d}{4 \, x^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))^2/x^5,x, algorithm="maxima")

[Out]

-2/27*b^2*e*(n^2/x^3 + 3*n*log(c*x^n)/x^3) - 1/32*b^2*d*(n^2/x^4 + 4*n*log(c*x^n)/x^4) - 1/3*b^2*e*log(c*x^n)^
2/x^3 - 2/9*a*b*e*n/x^3 - 2/3*a*b*e*log(c*x^n)/x^3 - 1/4*b^2*d*log(c*x^n)^2/x^4 - 1/8*a*b*d*n/x^4 - 1/3*a^2*e/
x^3 - 1/2*a*b*d*log(c*x^n)/x^4 - 1/4*a^2*d/x^4

________________________________________________________________________________________

mupad [B]  time = 3.51, size = 114, normalized size = 1.05 \[ -\frac {x\,\left (24\,e\,a^2+16\,e\,a\,b\,n+\frac {16\,e\,b^2\,n^2}{3}\right )+18\,a^2\,d+\frac {9\,b^2\,d\,n^2}{4}+9\,a\,b\,d\,n}{72\,x^4}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {3\,b\,d\,\left (4\,a+b\,n\right )}{4}+\frac {4\,b\,e\,x\,\left (3\,a+b\,n\right )}{3}\right )}{6\,x^4}-\frac {{\ln \left (c\,x^n\right )}^2\,\left (\frac {b^2\,d}{4}+\frac {b^2\,e\,x}{3}\right )}{x^4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*log(c*x^n))^2*(d + e*x))/x^5,x)

[Out]

- (x*(24*a^2*e + (16*b^2*e*n^2)/3 + 16*a*b*e*n) + 18*a^2*d + (9*b^2*d*n^2)/4 + 9*a*b*d*n)/(72*x^4) - (log(c*x^
n)*((3*b*d*(4*a + b*n))/4 + (4*b*e*x*(3*a + b*n))/3))/(6*x^4) - (log(c*x^n)^2*((b^2*d)/4 + (b^2*e*x)/3))/x^4

________________________________________________________________________________________

sympy [B]  time = 3.07, size = 311, normalized size = 2.85 \[ - \frac {a^{2} d}{4 x^{4}} - \frac {a^{2} e}{3 x^{3}} - \frac {a b d n \log {\relax (x )}}{2 x^{4}} - \frac {a b d n}{8 x^{4}} - \frac {a b d \log {\relax (c )}}{2 x^{4}} - \frac {2 a b e n \log {\relax (x )}}{3 x^{3}} - \frac {2 a b e n}{9 x^{3}} - \frac {2 a b e \log {\relax (c )}}{3 x^{3}} - \frac {b^{2} d n^{2} \log {\relax (x )}^{2}}{4 x^{4}} - \frac {b^{2} d n^{2} \log {\relax (x )}}{8 x^{4}} - \frac {b^{2} d n^{2}}{32 x^{4}} - \frac {b^{2} d n \log {\relax (c )} \log {\relax (x )}}{2 x^{4}} - \frac {b^{2} d n \log {\relax (c )}}{8 x^{4}} - \frac {b^{2} d \log {\relax (c )}^{2}}{4 x^{4}} - \frac {b^{2} e n^{2} \log {\relax (x )}^{2}}{3 x^{3}} - \frac {2 b^{2} e n^{2} \log {\relax (x )}}{9 x^{3}} - \frac {2 b^{2} e n^{2}}{27 x^{3}} - \frac {2 b^{2} e n \log {\relax (c )} \log {\relax (x )}}{3 x^{3}} - \frac {2 b^{2} e n \log {\relax (c )}}{9 x^{3}} - \frac {b^{2} e \log {\relax (c )}^{2}}{3 x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*ln(c*x**n))**2/x**5,x)

[Out]

-a**2*d/(4*x**4) - a**2*e/(3*x**3) - a*b*d*n*log(x)/(2*x**4) - a*b*d*n/(8*x**4) - a*b*d*log(c)/(2*x**4) - 2*a*
b*e*n*log(x)/(3*x**3) - 2*a*b*e*n/(9*x**3) - 2*a*b*e*log(c)/(3*x**3) - b**2*d*n**2*log(x)**2/(4*x**4) - b**2*d
*n**2*log(x)/(8*x**4) - b**2*d*n**2/(32*x**4) - b**2*d*n*log(c)*log(x)/(2*x**4) - b**2*d*n*log(c)/(8*x**4) - b
**2*d*log(c)**2/(4*x**4) - b**2*e*n**2*log(x)**2/(3*x**3) - 2*b**2*e*n**2*log(x)/(9*x**3) - 2*b**2*e*n**2/(27*
x**3) - 2*b**2*e*n*log(c)*log(x)/(3*x**3) - 2*b**2*e*n*log(c)/(9*x**3) - b**2*e*log(c)**2/(3*x**3)

________________________________________________________________________________________